﻿<ResourceDictionary
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" 
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:vsm="clr-namespace:System.Windows;assembly=System.Windows"
    
   xmlns:esri="http://schemas.esri.com/arcgis/client/2009">
    
    <esri:SimpleMarkerSymbol x:Key="DefaultMarkerSymbol" Color="Red" Size="12" Style="Circle" />
    <esri:SimpleLineSymbol x:Key="DefaultLineSymbol" Color="Red" Width="4" />
    <esri:SimpleFillSymbol x:Name="DefaultFillSymbol" Fill="#33FF0000" BorderBrush="Red" BorderThickness="2" />


    <esri:SimpleLineSymbol x:Key="MeasureLineSymbol" Color="Blue" Width="1"/>
    <esri:SimpleFillSymbol x:Name="MeasureFillSymbol" Fill="#330089FF" BorderBrush="Blue" BorderThickness="1" />

    <esri:SimpleMarkerSymbol x:Key="DrawHotMarkerSymbol" Color="Red" Size="1" Style="Circle" />
    <esri:SimpleLineSymbol x:Key="DrawHotLineSymbol" Color="Black" Width="1"/>
    <esri:SimpleFillSymbol x:Name="DrawHotFillSymbol" Fill="#7ECACACA" BorderBrush="Black" BorderThickness="1" />


    <esri:MarkerSymbol x:Key="SelectMarkerSymbol" >
        <esri:MarkerSymbol.ControlTemplate>
            <ControlTemplate>
                <Ellipse x:Name="Element" Width="10" Height="10" StrokeThickness="10" 
								 Stroke="Green" >
                    <VisualStateManager.VisualStateGroups>
                        <VisualStateGroup x:Name="SelectionStates">
                            <VisualState x:Name="Unselected" />
                            <VisualState x:Name="Selected">
                                <Storyboard>
                                    <ColorAnimation Storyboard.TargetName="Element" 
												Storyboard.TargetProperty="(Ellipse.Stroke).(SolidColorBrush.Color)"
												To="Cyan" Duration="00:00:0.25"/>
                                </Storyboard>
                            </VisualState>
                        </VisualStateGroup>
                    </VisualStateManager.VisualStateGroups>
                </Ellipse>
            </ControlTemplate>
        </esri:MarkerSymbol.ControlTemplate>
    </esri:MarkerSymbol>

    <esri:LineSymbol x:Key="SelectLineSymbol">
        <esri:LineSymbol.ControlTemplate>
            <ControlTemplate>
                <Path x:Name="Element"
							Stroke="Blue"
							StrokeStartLineCap="Round"
							StrokeThickness="4"
							StrokeLineJoin="Round"
							StrokeEndLineCap="Round">
                    <VisualStateManager.VisualStateGroups>
                        <VisualStateGroup x:Name="SelectionStates">
                            <!--By specifying an empty Unselected state,
									unselecting the graphic will instantly set the
									values back to their original value without any animation.
									Set a storyboard if you want a smooth transition 
									back (see SelectFillSymbol template) -->
                            <VisualState x:Name="Unselected" />
                            <VisualState x:Name="Selected">
                                <Storyboard>
                                    <ColorAnimation Storyboard.TargetName="Element" 
												Storyboard.TargetProperty="(Path.Stroke).(SolidColorBrush.Color)"
												To="Cyan"  Duration="00:00:00.25" />
                                    <DoubleAnimation Storyboard.TargetName="Element"
												Storyboard.TargetProperty="StrokeThickness"
												To="10"  Duration="00:00:00.25" />
                                </Storyboard>
                            </VisualState>
                        </VisualStateGroup>
                    </VisualStateManager.VisualStateGroups>
                </Path>
            </ControlTemplate>
        </esri:LineSymbol.ControlTemplate>
    </esri:LineSymbol>


    <esri:FillSymbol x:Key="SelectFillSymbol">
        <esri:FillSymbol.ControlTemplate>
            <ControlTemplate>
                <Path x:Name="Element"
							Stroke="Black"
							StrokeStartLineCap="Round"
							StrokeThickness="2"
							StrokeLineJoin="Round"
							StrokeEndLineCap="Round" 
							Fill="#913976BA">
                    <VisualStateManager.VisualStateGroups>
                        <VisualStateGroup x:Name="SelectionStates">
                            <VisualState x:Name="Unselected" >
                                <Storyboard>
                                    <ColorAnimation Storyboard.TargetName="Element" 
											Storyboard.TargetProperty="(Path.Fill).(SolidColorBrush.Color)"
											To="#913976BA"  Duration="00:00:00.25"/>
                                </Storyboard>
                            </VisualState>
                            <VisualState x:Name="Selected">
                                <Storyboard>
                                    <ColorAnimation Storyboard.TargetName="Element" 
											Storyboard.TargetProperty="(Path.Fill).(SolidColorBrush.Color)"
											To="#8100FFFF" Duration="00:00:00.25"/>
                                    <ObjectAnimationUsingKeyFrames Storyboard.TargetName="Element" Storyboard.TargetProperty="StrokeDashArray">
                                        <DiscreteObjectKeyFrame KeyTime="0:0:0">
                                            <DiscreteObjectKeyFrame.Value>
                                                <DoubleCollection>2,1</DoubleCollection>
                                            </DiscreteObjectKeyFrame.Value>
                                        </DiscreteObjectKeyFrame>
                                    </ObjectAnimationUsingKeyFrames>
                                </Storyboard>
                            </VisualState>
                        </VisualStateGroup>
                    </VisualStateManager.VisualStateGroups>
                </Path>
            </ControlTemplate>
        </esri:FillSymbol.ControlTemplate>
    </esri:FillSymbol>

</ResourceDictionary>
